
package com.uchedao.seller.module.car;

import android.text.TextUtils;

import java.io.Serializable;

/**
 * 汽车的品牌模型类
 * 
 * @author liwt@273.cn
 * @update 2013-06-13
 */
public class CarBrand implements Serializable {
    /**
     * 序列化ID
     */
    private static final long serialVersionUID = 1L;

    /**
     * 热门品牌
     */
    public static final int TYPE_HOT = 0x1000;

    /**
     * 一般品牌
     */
    public static final int TYPE_NORMAL = 0x1001;

    /**
     * 品牌id
     */
    private int id = 0;

    /**
     * 品牌名
     */
    private String text = "";

    /**
     * 品牌全拼
     */
    private String full_spell = "";

    /**
     * 首字母
     */
    private String initial = "";

    /**
     * 所包含的车辆类型
     */
    private String vehicle_type = "";

    /**
     * 图片
     */
    private String icon_path = "";

    /**
     * 品牌类型(热门/普通)
     */
    private int type = TYPE_NORMAL;

    public CarBrand() {
        super();
    }

    public CarBrand(int id, String name, String spell) {
        super();
        this.id = id;
        this.text = name;
        this.full_spell = spell;
        if (!TextUtils.isEmpty(spell.trim())) {
            this.initial = spell.trim().substring(0, 1).toUpperCase();
        }
    }

    public String getInitial() {
        return initial;
    }

    public String getVehicle_type() {
        return vehicle_type;
    }

    public void setVehicle_type(String vehicle_type) {
        this.vehicle_type = vehicle_type;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return text;
    }

    public void setName(String name) {
        this.text = name;
    }

    public String getSpell() {
        return full_spell;
    }

    public void setSpell(String spell) {
        this.full_spell = spell;
        if (!TextUtils.isEmpty(spell.trim())) {
            this.initial = spell.trim().substring(0, 1).toUpperCase();
        }
    }

    /**
     * @param type
     */
    public void setType(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public String getImage() {
        return icon_path;
    }

    public void setImage(String image) {
        this.icon_path = image;
    }

    @Override
    public String toString() {
        return "CarBrand [id=" + id + ", name=" + text + ", spell=" + full_spell + "]";
    }

}
